package com.atg.atgchat.init.common.utils;

import com.atg.atgchat.init.user.model.dto.RequestInfo;

/*
author: atg
time: 2025/1/16 10:59
*/
public class RequestContext {
    private static final ThreadLocal<RequestInfo> contextHolder = new ThreadLocal<>();
    public static void setRequestInfo(RequestInfo requestInfo) {
        contextHolder.set(requestInfo);
    }
    public static RequestInfo getRequestInfo() {
        return contextHolder.get();
    }
    public static void removeRequestInfo() {
        contextHolder.remove();
    }
}
